import { AccessModel } from '~/server/models/access.model';

// 清空访问日志
export default defineEventHandler(async (): Promise<any> => {
	try {
		await AccessModel.deleteMany();

		return {
			code: 1,
			message: '清空访问日志成功',
		};
	} catch (error: any) {
		return {
			code: 0,
			message: error.message,
		};
	}
});
